interface ICtorPerson {
  new (name: string): Person;
}

// function factory(fn: ICtorPerson) {
function factory(fn: new (name: string) => Person) {
  return new fn("zs");
}

// Person既是一个类，也是一个构造函数
class Person {
  name: string;
  constructor(name: string) {
    this.name = name;
  }
}
factory(Person);

export {};
